<template>
	<div>
		<h2>登录页面</h2>
		<button @click="tolist">登录</button>
	</div>
</template>

<script>
	export default{
		created: function(){
			console.log(this.$route)
			// console.log(this.$route.query);
		},
		methods:{
			tolist:function(){
				let user=JSON.parse(localStorage.getItem("user"))
				// console.log(user)
				user.islogin=true;
				localStorage.setItem("user",JSON.stringify(user))
				this.$router.push(this.$route.query.url)
			}
		}
	}
</script>

<style>
</style>
